'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  // 查看 接口文档
  router.redirect('/s', '/swagger-ui.html' , 302); //重定向到swagger-ui.html
  router.get('/', controller.home.index);
  router.get('/ppyy/index', controller.home.index);

  // 登录模块
  router.post('/ppyy/login', controller.login.login);
  router.post('/ppyy/register', controller.login.register);
  router.post('/ppyy/forgetPassword', controller.login.forgetPassword);

  // 邮箱号验证
  router.post('/ppyy/email', controller.email.postEmail);
};
